package com.esiag.isidis.fi.pdsTeam.jms.chooser.impl;

import com.esiag.isidis.fi.pdsTeam.jms.chooser.IActionChooser;
import com.esiag.isidis.fi.pdsTeam.jms.executer.Executer;
import com.esiag.isidis.fi.pdsTeam.receive.beans.Action;


public class ActionChooser implements IActionChooser{

	private Executer mExpenderExecuter;
	private Executer mNetFieldExecuter;
	
	public void chooseAction(Action pAction) {
		
		if(pAction.getActionsList() != null && pAction.getActionsList().size() > 0){
			mExpenderExecuter.execute(pAction);
		}else{
			mNetFieldExecuter.execute(pAction);
			
		}
		
	}

	public void setmExpenderExecuter(Executer mExpenderExecuter) {
		this.mExpenderExecuter = mExpenderExecuter;
	}

	public void setmNetFieldExecuter(Executer mNetFieldExecuter) {
		this.mNetFieldExecuter = mNetFieldExecuter;
	}

	public Executer getmExpenderExecuter() {
		return mExpenderExecuter;
	}

	public Executer getmNetFieldExecuter() {
		return mNetFieldExecuter;
	}
	
	

}
